<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        //try_catch_finally  语句用于处理代码中可能出现的错误信息
        //1、捕获代码执行过程中可能出现的错误，防止其影响后续代码的执行
        //  兼容写法（错误发时时的补救措施）
        try {
            var a = 1
            var b = a
            var c = 1;
            console.log(c);
        } catch (err) {
            console.log(err);
        } finally {
            console.log("代码执行完毕");
        }




    </script>
</body>

</html>